<!doctype html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link href="../css/mui.min.css" rel="stylesheet" />
	</head>

	<body>
		
		<!--下拉刷新容器-->
		<div id="refreshContainer" class="mui-content mui-scroll-wrapper" style="z-index: -1;">
		  <div class="mui-scroll">
		    <!--数据列表-->
		    <ul class="mui-table-view mui-table-view-chevron" id="houselist">
		      
		    </ul>
		  </div>
		</div>
		
		<script src="../js/mui.min.js"></script>
		<script src="../js/jquery-2.1.0.js"></script>
		<script src="../js/jquery.tmpl.min.js"></script>
		<script language='javascript' src='js/md5.js'></script>
		<script src="../js/network.js"></script>
		<script src="../js/enum.util.js"></script>
		<script src="../js/common.util.js"></script>
		<script src="../js/fj_base_data.js"></script>
		
		
		<script id="buildingNameTmpl" type="text/x-jquery-tmpl">
			<div>
            	3室1厅1卫 建筑面积 120㎡ 均价 100万/套
            </div>
            <div>
            	<span class="mui-badge mui-badge-success mui-badge-inverted">标签1</span>
            	<span class="mui-badge mui-badge-success mui-badge-inverted">标签1</span>
            	<span class="mui-badge mui-badge-success mui-badge-inverted">标签1</span>
            </div>
            <div align="center">
            	<img src="../images/bg_home_top@2x.png" style="max-width: 100%;" />
            </div>
		</script>
		
		<script type="text/javascript">
			mui.init({
				pullRefresh:{
					container:"#refreshContainer",
					down:{
						callback: pulldownRefresh
					},
					up:{
						callback:pullupRefresh
					}
				}
			});
			
			var pagevalue =1;
			function pulldownRefresh(){
				$('.mui-pull').hide();
				setTimeout(function(){
					allHouseTypeData(1,true);
					mui('#refreshContainer').pullRefresh().endPulldownToRefresh();
					mui('#refreshContainer').pullRefresh().enablePullupToRefresh();
					return pagevalue=1;
				},1000);
			}
			function pullupRefresh(){
				$('.mui-pull').show();
				setTimeout(function(){
					pagevalue++;
					allHouseTypeData(pagevalue,false);
				},1000);
			}
			
			function allHouseTypeData(pagevalue,isTrue){

				var param = [{
					key:'page',
					value:pagevalue
				},{
					key:'rows',
					value:10
				}];
				fjNetwork.get('fjzx/common/building-detail.json',param,function(data){
//					console.log(JSON.stringify(data));
					var housetype = data.buildingHouseTypePageList;
				})
			}
		</script>
	</body>

</html>